<%--
  User: cjp
  Date: 2007-7-2
  Time: 20:50:29
--%>
<%@ include file="/common/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title>Simple jsp page</title></head>
<script type="text/">
   function checkall(thisForm){
       
   }
</script>
<body leftmargin="10" topmargin="10">
<table width="100%" border="0" cellpadding="2" cellspacing="6">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide">
    <tr>
        <td>
            <a href="#"
               onClick="parent.menu.location='admincp.php?action=menu'; parent.main.location='admincp.php?action=home';return false;">系统设置首页</a>
            &nbsp;&raquo;&nbsp;用户组
        </td>
    </tr>
</table>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
    <tr class="header">
        <td>
            <div style="float:left; margin-left:0px; padding-top:8px"><a href="###" onclick="collapse_change('tip')">技巧提示</a>
            </div>
            <div style="float:right; margin-right:4px; padding-bottom:9px"><a href="###"
                                                                              onclick="collapse_change('tip')">
                <img id="menuimg_tip" src="http://images.5d6d.com/orig/admincp/menu_reduce.gif" border="0"/></a></div>
        </td>
    </tr>
    <tbody id="menu_tip">
        <tr>
            <td>
                <ul>
                    <li>Discuz! 论坛用户组分为系统组、特殊组和会员组，会员组以积分确定组别和权限，而系统组和特殊组是人为设定，不会由论坛系统自行改变。
                </ul>
                <ul>
                    <li>系统组和特殊组的设定不需要指定积分，Discuz! 预留了从论坛管理员到游客等的 8 个系统头衔，特殊组的用户需要在编辑会员时将其加入。
                </ul>
                <ul>
                    <li>会员用户组至少分为两组，其积分下限分别为负值(任一负数)和 0，否则将导致部分用户无法与用户组匹配的问题。
                </ul>
            </td>
        </tr>
    </tbody>
</table>
<br/>

<!--start 用户组-->
<s:form action="/admin/normalUserGroup.do" id="demo" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
    <tr class="header">
        <td colspan="8">会员用户组 - 点击详情编辑用户组权限设置</td>
    </tr>
    <tr class="category" align="center">
        <td width="48"><input class="checkbox" type="checkbox" name="chkall" class="category"
                              onclick="checkall(this.form)">删?
        </td>
        <td>组头衔</td>
        <td>积分大于</td>
        <td>积分小于</td>
        <td>星星数</td>
        <td>编辑</td>
    </tr>

    <c:forEach items="${actionBean.memberUserGroups}" var="userGroup">
        <input type="hidden" name="userGroupId" value="${userGroup.id}">
        <tr align="center">
            <td class="altbg1"><input class="checkbox" type="checkbox" name="delete[${userGroup.id}]" value="${userGroup.id}"></td>
            <td class="altbg2">
                <s:text size="12" name="groupnew[${userGroup.id}][grouptitle]"
                        value="${userGroup.title}"/>
            </td>
            <td class="altbg1"><input type="text" size="6" name="groupnew[${userGroup.id}][pointHigner]"
                                      value="${userGroup.pointHigner}">
            <td class="altbg2"><input type="text" size="6" name="groupnew[${userGroup.id}][pointLower]" value="${userGroup.pointLower}">
            <td class="altbg1"><input type="text" size="2" name="groupnew[${userGroup.id}][stars]"
                                      value="${userGroup.stars}"></td>

            <td class="altbg2" nowrap><a href="${ctx}/admin/normalUserGroup.do?setDetailPurviewForm&groupId=${userGroup.id}">[详情]</a></td>
        </tr>
    </c:forEach>
    <tbody id="addnewusergroup2" style="display: none;">
        <tr align="center" class="altbg1">
            <input type="hidden" name="userGroupId" value="-1"/>
            <td>&nbsp;</td>
            <td><input type="text" size="12" name="groupnew[-1][grouptitle]"></td>
            <td><input type="text" size="6" name="groupnew[-1][pointHigner]"></td>
            <td><input type="text" size="6" name="groupnew[-1][pointLower]"></td>
            <td><input type="text" size="2" name="groupnew[-1][stars]"></td>
            <td align="right"></td>
            <td colspan="3"></td>
        </tr>
    </tbody>

    <tbody id="addnewusergroup">
        <tr align="center" class="altbg1">
            <td>新增:
                <a href="###" onclick="var newnode = document.getElementById('addnewusergroup2').firstChild.cloneNode(true);
                       document.getElementById('addnewusergroup').appendChild(newnode)">[+]</a>
            </td>
            <td>
                <input type="text" size="12" name="groupnew[-1][grouptitle]"/>
            </td>
            <td><input type="text" size="6" name="groupnew[-1][pointHigner]"></td>
            <td><input type="text" size="6" name="groupnew[-1][pointLower]"></td>
            <td><input type="text" size="2" name="groupnew[-1][stars]"></td>
            <td align="right"></td>
            <input type="hidden" name="userGroupId" value="-1"/>
        </tr>

    </tbody>
</table>
<br>
<center><input class="button" type="submit" name="normalUserGroupForm" value="提 交">&nbsp;
</s:form>
<br>
<!--end 用户组-->


<!--start系统组-->
<s:form method="post" action="/admin/adminGroupManage.do">
    <input type="hidden" name="formhash" value="00756f41">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
        <tr class="header">
            <td colspan="6">系统用户组 - 点击详情编辑用户组权限设置</td>
        </tr>
        <tr class="category" align="center">
            <td>组头衔</td>
            <td>系统头衔</td>
            <td>星星数</td>
            <td>编辑</td>
        </tr>

        <c:forEach items="${actionBean.systemUserGroups}" var="userGroup">
            <tr align="center">
                <s:hidden name="adminGroupId" value="${userGroup.id}"/>
                <td class="altbg2"><s:text size="12" name="group_title[${userGroup.id}]" value="${userGroup.title}"/></td>
                <td class="altbg1">${userGroup.title}</td>
                <td class="altbg2"><s:text size="2" name="group_stars[${userGroup.id}]" value="${userGroup.stars}"/></td>
                <td class="altbg1" nowrap><a href="${ctx}/admin/normalUserGroup.do?setDetailPurviewForm&groupId=${userGroup.id}">[详情]</a></td>
            </tr>
        </c:forEach>
    </table>
    <br>
    <center>
        <input class="button" type="submit" name="normalAdminGroupForm" value="提 交"></center>
</s:form>
<!--end 系统组-->

</td>
</tr>
</table>
</body>
</html>